home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / TOTDEMO.ARJ / EXTDEM7.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-11  |  1KB  |  71 lines

  1. Program ExtendedDemoSeven;
  2. {EXTDEM7 - this program shows how to use the BooleanIOOBJ created
  3.            in the unit ExtIO. The demo is an adaptation of DEMIO2}
  4.  
  5. Uses DOS,CRT,
  6.      totFAST, totIO1, totIO2, extIO;
  7.  
  8. Var
  9.    Name: LateralIOOBJ;
  10.    Phone: PictureIOOBJ;
  11.    Price: FixedRealIOOBJ;
  12.    Status: BooleanIOOBJ;
  13.    Keys: ControlkeysIOOBJ;
  14.    Manager: FormOBJ;
  15.    Result: tAction;
  16.  
  17. procedure InitVars;
  18. {}
  19. begin
  20.    with Name do
  21.    begin
  22.       Init(35,5,20,40);
  23.       SetLabel('Vendor Name');
  24.    end;
  25.    with Phone do
  26.    begin
  27.       Init(35,7,'(###) ###-####');
  28.       SetLabel('Tel');
  29.       SetRules(JumpIfFull);
  30.    end;
  31.    with Price do
  32.    begin
  33.       Init(35,9,8,2);
  34.       SetLabel('Unit Price');
  35.       SetValue(250.0);
  36.       SetMinMax(0.1,12250.0);
  37.       SetRules(EraseDefault);
  38.    end;
  39.    with Status do
  40.    begin
  41.       Init(35,11,' Nice Guy ',' Jerk ');
  42.       SetLabel('Category');
  43.    end;
  44.    Keys.Init;
  45. end; {InitVars}
  46.  
  47. begin
  48.    ClrScr;
  49.    Screen.TitledBox(15,3,65,13,76,79,78,2,' Quicky Input Demo ');
  50.    Screen.WriteCenter(25,white,'Press TAB to switch fields and press ESC or F10 to end');
  51.    InitVars;
  52.    with Manager do
  53.    begin
  54.       Init;
  55.       AddItem(Keys);
  56.       AddItem(Name);
  57.       AddItem(Phone);
  58.       AddItem(Price);
  59.       AddItem(Status);
  60.       Result := Go;
  61.       if Result = Finished then
  62.          {update the database..}
  63.       else
  64.          {call Esc routine};
  65.    end;
  66. end.
  67.  
  68.  
  69.  
  70.  
  71.